package com.tt.fashionWebSite.dao.jpa;

import com.tt.fashionWebSite.dao.LoaiDanhMucFullDao;
import com.tt.fashionWebSite.domain.LoaiDanhMucFull;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by isoft-work 5 on 12/6/2014.
 */
@Repository("loaiDanhMucFull")
public class LoaiDanhMucFullJpaDao extends GenericJpaDao<LoaiDanhMucFull,String> implements LoaiDanhMucFullDao {
   public LoaiDanhMucFullJpaDao(){
      super(LoaiDanhMucFull.class);
   }

   @Override
   public List<LoaiDanhMucFull> getListMenu() {
      return getEntityManager().createNamedQuery(LoaiDanhMucFull.GET_LOAI_DANH_MUC, LoaiDanhMucFull.class)
            .getResultList();
   }

   @Override
   public List<LoaiDanhMucFull> getListMenuSuppose() {
      return getEntityManager().createNamedQuery(LoaiDanhMucFull.GET_LOAI_DANH_MUC_SUPPOSED, LoaiDanhMucFull.class)
            .getResultList();
   }
}
